CXX = ccache g++

INC = -I /usr/include/boost-1_33_1/ # required for cygwin
OBJS = value.o value_visitors.o instr.o vm.o vm_func.o actor.o actor_parse.o assert_test.o
FLAGS = -g -Wall  #-fprofile-arcs -ftest-coverage
SFLAGS = -Wall  -fsyntax-only

.PHONY: check-syntax
check-syntax:
	$(CXX) $(SFLAGS) $(CHK_SOURCES) 

all: vm-test vm-run

.cpp.o:
	$(CXX) $(FLAGS) $(INC) $< -c -o $@ 

libbmdvm.a: $(OBJS)
	ar rcs libbmdvm.a $(OBJS);

vm-test: libbmdvm.a vm-test.cpp
	$(CXX) $(FLAGS) $(INC) -o vm-test vm-test.cpp libbmdvm.a

vm-run: libbmdvm.a vm-run.cpp
	$(CXX) $(FLAGS) $(INC) -o vm-run vm-run.cpp libbmdvm.a

docs: 
	doxygen Doxyfile

clean:
	rm -f *.o *~ vm-test vm-run *.a;
	rm -rf docs


